package lesson09;

public class PetFactory {
	public static Pet getInspet(int n) {
		Pet pet=null;
		if (n==0) {
			pet=new Dog();
		} else if (n==1) {
			pet=new Penguin();
		} else if (n==2) {
			pet=new Bird();
		} 
		return pet;
	}
}
